<template>
    <lib-doc :libDocData="libDocData"></lib-doc>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import LibDoc from '@/components/LibDoc.vue'
import { LibDocInterface } from '@/service/LibDocService'
export default defineComponent({
    name: 'i_search_demo',
    setup () {
        const libDocData: LibDocInterface = {
            title: '抽屉',
            docList: [
                {
                    label: '引入组件',
                    value: `
        import { IDrawer } from 'wd-platform-library'`
                },
                {
                    label: '抽屉对象',
                    type: 'pre',
                    value: `
    const drawerData = reactive<DrawerIntreFace>({
            width: 1200, // 抽屉宽度
            buttonList: [
                {
                    label: '取消',
                    buttonFun: 'dialogCancel',
                    options: {
                        type: 'default'
                    },
                    isShow: true
                },
                {
                    label: '确定',
                    buttonFun: 'dialogSbumit',
                    options: {
                        type: 'primary'
                    },
                    loading: false,
                    isShow: true
                }
            ],
            show: false, // 抽屉是否展示
            title: '设置权限' // 抽屉名字
        })`
                },
                {
                    label: 'buttonList说明',
                    type: 'pre',
                    value: `
        {
            label: '确定',
            buttonFun: 'dialogSbumit',
            options: {
                    type: 'primary'
            },
            template: 'but_template',自定义按钮
            loading: false,
            isShow: true
        }`
                },
                {
                    label: '弹出框关闭后调@cancel',
                    type: 'pre',
                    value: `
     注册cancel方法  : <i-drawer :drawerData="drawerData"  @cancel="dialogCancel">`
                }

            ]
        }
        return {
            libDocData
        }
    },
    methods: {},
    components: { LibDoc }
})
</script>
